package com.jingxi.rest.service;

import com.jingxi.common.pojo.JingXiResult;
import com.jingxi.rest.dao.JedisClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RedisServiceImpl implements RedisService {
    @Autowired
    JedisClient jedisClient;
    private static final String INDEX_CONTENT_REDIS_KEY = "INDEX_CONTENT_REDIS_KEY";
    @Override
    public JingXiResult syncContent(long contentCid) {
        try {
            jedisClient.hdel(INDEX_CONTENT_REDIS_KEY,contentCid+"");

        }catch (Exception e){
            e.printStackTrace();
            return JingXiResult.build(500,"获取缓存失败");
        }
        return JingXiResult.ok();
    }
}
